<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>{% block title %}iHere - Python, Google App Engine, Django, Java & My Life{% endblock %}</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Pragma" contect="no-cache">
<link rel="stylesheet" type="text/css" href="/static/stylesheets/style.css" />
<!--[if IE]>
    <link rel="stylesheet" type="text/css" href="/static/stylesheets/style-ie.css" />
<![endif]-->
<link rel="stylesheet" type="text/css" href="/static/stylesheets/main.css" />
</head>
<body class="yui-skin-sam">
<div id="container"><!-- content start -->
<div id="header">
	{% include 'main_header.html'%}
</div>	

{% include "sidebar.html" %}
<div id="clearer"></div>
<div id="content-full">
<div id="content-wrapper">
<!-- box start -->
<div class="box">
<h2 style="clear: both;">
	<a href="/" style="color: white;text-decoration:none;">[ Blog ]</a>&nbsp;-&nbsp;
	<a href="/album/" style="color: white;text-decoration:none;">[ Album ]</a>&nbsp;-&nbsp;
	<a href="http://code.google.com/p/mouse-action/" style="color: white;text-decoration:none;">[ Project Home ]</a>&nbsp;-&nbsp;
	<a href="/labs/" style="color: white;text-decoration:none;">[ Labs ]</a>&nbsp;-&nbsp;
	<a href="http://code.google.com/p/mouse-action/downloads/list" style="color: white;text-decoration:none;">[ Downloads ]</a>&nbsp;-&nbsp;
	<a href="http://groups.google.com/group/ihere-bouleuterion?lnk=gcamh" style="color: white;text-decoration:none;">[ Discussions ]</a>&nbsp;-&nbsp;
	<a href="/about/" style="color: white;text-decoration:none;">[ About me ]</a>

</h2>

<div class="top-corners">
<div></div>
</div>
<div class="box-content">
<div class="box-content-2">
<div style="padding-top: 5%; padding-bottom: 5%;">

<div style="height:5px;width:1px;"></div>
<div style="float:right;clear:right;margin:25px 5px 5px 0;">
	{% include 'action_bar.html' %}
</div>
<div style="word-wrap: break-all; overflow: hidden;">
{% block content %}{% endblock %}
</div>
</div>
<div class="box-bottom"></div>
</div>
</div>
<div class="bottom-corners">
<div></div>
</div>
</div>
<!-- box end --></div>
</div>
<!-- wrapper end -->
<div class="clearer"></div>
<!-- footer start -->
<div id="footer">
<p>&#169; 2008 iHere 
	<a href="http://www.appspot.com">
		<img src="http://code.google.com/appengine/images/appengine-noborder-120x30.gif" alt="Powered by Google App Engine" />
	</a>
</p>
</div>
<!-- footer end --></div>
</body>
<script src="http://www.google.com/jsapi?key=ABQIAAAARwizqlGgnYjpB2I2ZtBy1BTgmTdkin2_3ZiF3sYgyVNgvPJfpBRdxmY49FZZi8OgF2MioCl9dN1qfg" type="text/javascript"></script>
    <script language="Javascript" type="text/javascript">
    //<![CDATA[

    google.load("search", "1");

    function OnLoad() {
      // Create a search control
      var searchControl = new google.search.SearchControl();

      // Add in a full set of searchers
      var localSearch = new google.search.LocalSearch();
      searchControl.addSearcher(localSearch);
      searchControl.addSearcher(new google.search.BlogSearch());
      searchControl.addSearcher(new google.search.WebSearch());
//      searchControl.addSearcher(new google.search.VideoSearch());
      

      // Set the Local Search center point
      localSearch.setCenterPoint("New York, NY");

      //var drawOptions = new GdrawOptionsgoogle.search.DrawOptions();
      //drawOptions.setDrawMode(GSearchControlgoogle.search.SearchControl.DRAW_MODE_TABBED);
            
      // Tell the searcher to draw itself and tell it where to attach
      searchControl.draw(document.getElementById("searchcontrol"));

      // Execute an inital search
      //searchControl.execute("");
    }
    google.setOnLoadCallback(OnLoad);

    //]]>
</script>

<script type="text/javascript">

function relative_time(time_value) {
var time_correct = time_value.split('+0000');
var parsed_date = Date.parse(time_correct[0]+'GMT+0000'+time_correct[1]);
var relative_to = new Date();
var delta = parseInt((relative_to.getTime() - parsed_date) / 1000);
if(delta < 60) return 'less than a minute ago';
else if(delta < 120) return '大约 1 分钟';
else if(delta < (45*60)) return '约 '+(parseInt(delta / 60)).toString() + ' 分钟';
else if(delta < (90*60)) return '大约 1 小时';
else if(delta < (24*60*60)) return '约 ' + (parseInt(delta / 3600)).toString() + ' 小时';
else if(delta < (48*60*60)) return '大约 1 天';
else return (parseInt(delta / 86400)).toString() + ' 天前';
}

function twitterCallback(obj){
var twitterHTML = '';
var firstTwitter= '';
for(var i=0; i<(obj.length); i++){
twitterHTML += '<li><span class="item-title"><a href="http://twitter.com/Lin_Cong/statuses/'+obj[i].id+'">' + obj[i].text + '</a></span><span class="item-date"> - ' + relative_time(obj[i].created_at) + '</span></li>';
}
firstTwitter='<span class="item-title"><a style="text-decoration:none;" href="http://twitter.com/Lin_Cong/statuses/'+obj[0].id+'">' + obj[0].text + '</a></span><span class="item-date"> - ' + relative_time(obj[0].created_at) + '</span>';
document.getElementById('my_twitter').innerHTML = twitterHTML;
document.getElementById('header_twitter').innerHTML = firstTwitter;
}
</script>

<script src="http://twitter.com/statuses/user_timeline/18129120.json?callback=twitterCallback&count=3" type="text/javascript"></script>

</html>